package com.nthink.indicators.controller;

import com.nthink.indicators.pojo.condition.TimeCondition;
import com.nthink.indicators.pojo.hospitalindicators.PatientTreatmentFee;
import com.nthink.indicators.service.hospitalindicators.PatientTreatmentFeeService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * @author Angus Yu
 * @date 2021-03-31 16:23
 */
@Api(tags = "运行指标")
@RestController
public class PatientTreatmentFeeController {
    @Autowired
    private PatientTreatmentFeeService patientTreatmentFeeService;

    @GetMapping("/getHospitalIncome")
    public PatientTreatmentFee getHospitalIncome(@RequestParam(required = false) Date startTime, @RequestParam(required = false) Date endTime) {
        TimeCondition timeCondition = new TimeCondition(startTime,endTime);
        PatientTreatmentFee patientTreatmentFee = patientTreatmentFeeService.getData(timeCondition);
        return patientTreatmentFee;
    }

}
